<?
include_once('conn.php');
include_once('include/func.php');
include("admin_check.php") ;
if($admin[0][2]<>10 and $admin[0][2]<>8 and $admin[0][2]<>7){exit('<script>alert("您没有权限"); window.history.back(-1);</script>');}
?>	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>order view</title>


</head>

<body>
<?
$order_detail = $db->select("SELECT * FROM `".tablepre."order` where `oid` = '".$_GET[oid]."'");
?><form action=""  name="myform" method="POST" onSubmit="return myfun()">
<table width="750" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td  valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr >
    <td colspan="2"><img src="images/ttfjpg.php?t=订单详情&bg=titlebg2.jpg&z=18&x=5&y=22&r=0&b=0&g=0"  /></td>
  </tr>
  <tr>
    <td align="right">订单号：</td>
    <td style="color:#000; font-size:16px;"><? echo $order_detail[0][4]; ?></td>
  </tr>
  <tr>
    <td align="right">下单时间：</td>
    <td><? echo $order_detail[0][11]; ?></td>
  </tr>
  <tr>
    <td  align="right">收件人：</td>
    <td  style="color:#000; font-size:16px;"><? echo $order_detail[0][5]; ?></td>
  </tr>
  <tr>
    <td align="right" >收件人手机：</td>
    <td style="color:#000; font-size:16px;"><? echo $order_detail[0][6]; ?></td>
  </tr>
  <tr>
    <td align="right">收件人电话：</td>
    <td style="color:#000; font-size:16px;"><? echo $order_detail[0][8]; ?></td>
  </tr>
  <tr>
    <td align="right">收件人地址：</td>
    <td style="color:#000; font-size:14px;"><? echo $order_detail[0][7]; ?></td>
  </tr>
  <tr>
    <td align="right">收件人邮编：</td>
    <td><? echo $order_detail[0][9]; ?></td>
  </tr>
  <tr>
    <td align="right">备注：</td>
    <td style="color: #F00; font-size:16px;"><? echo $order_detail[0][10]; ?></td>
  </tr>
  <tr>
    <td colspan="2"><img src="images/ttfjpg.php?t=付款信息&amp;bg=titlebg2.jpg&amp;z=18&amp;x=5&amp;y=22&amp;r=0&amp;b=0&amp;g=0"  /></td>
  </tr>
  <tr>
    <td align="right">支付状态：</td>
    <td><? echo $order_detail[0][15]==0?'<font color="#FF0000">未支付</font>':'已支付'; ?></td>
  </tr>
  <tr>
    <td align="right">支付方式：</td>
    <td><? echo $order_detail[0][14]; ?></td>
  </tr>
  <tr>
    <td colspan="2"><img src="images/ttfjpg.php?t=发货设置&bg=titlebg2.jpg&z=18&x=5&y=22&r=0&b=0&g=0"  /></td>
  </tr>
  <tr>
    <td align="right">货运公司：</td>
    <td>
      <select name="express" >
        <option value="">请选择货运公司</option>
        <?
        $e_arr=explode(',',parameters($con1='10'));
		foreach ($e_arr as $value) {
			echo ' <option value="'.$value.'">'.$value.'</option>';
			}
		?>
      </select></td>
  </tr>
  <tr>
    <td align="right">货运单号：</td>
    <td><input type="text" name="esn"  /></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td><input type="submit" name="button" id="button" value="发货" /></td>
  </tr>
</table></td>
    <td width="394" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><img src="images/ttfjpg.php?t=发货信息&amp;bg=titlebg2.jpg&amp;z=18&amp;x=5&amp;y=22&amp;r=0&amp;b=0&amp;g=0"  /></td>
        </tr>
        <tr>
          <td style="color:#000; font-size:14px;">
		  <style>
          #c1 {border: #666 1px solid; margin:5px;}
		  #c2 {border: #CCC 3px solid; padding:5px;}
		  #cleft { float:left; margin:0 5px 0 0; background: #F4F4F4;}
		  #cright { float:left; }
		  #cright ul { margin:0px; padding:0px;}
		  #cright li { list-style-type:none; float:left; padding:0 5px 5px 0;}
		  #cclear{ clear:both; height:0px; overflow:hidden; border-bottom:#666 1px dotted; padding:4px 0 4px 0;}
          </style><?
          $arr_list2 = $db->select("SELECT item,sid,amount FROM `".tablepre."order_item` where oid = '".$order_detail[0][0]."'");
		for($j=0;$j<count($arr_list2);$j++) {
			echo '<div id="c1"><div id="c2">物品名称：'.stock($con1=$arr_list2[$j][1],$con2=1).'&nbsp;&nbsp; 编号：'.attachment($con0=1,$con1=$arr_list2[$j][1],$con2='model').'<br />';
			$t = explode("|", $arr_list2[$j][0]); 
	foreach ($t as $key => $value) {
	$t2 = explode(",", $value);
	echo '<div id="cleft">颜色：'.$t2[0].'<br /></div><div id="cright"><ul>';
	foreach ($t2 as $key2 => $value2) {
		//echo $t3 = $key2==1?$value2:'';
		if($key2==1){
			$t3 = explode("~", $value2);
			//$t3=$value2;
		foreach ($t3 as $key3 => $value3) {
	
			echo $key3%2==0?'<li>▣ 尺寸'.$value3.',':'';
			echo $key3%2==1?'数量'.$value3.' </li>':'';
			}
			
			}
			
		} echo '</ul></div><div id="cclear"></div>';
	}echo '</div></div>';
			}
			//echo $item;
			//print_r($arr_list2);
		  ?></td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
  

</body>
</html>